//
// Created by wkm on 2023-12-13.
//

#include "large_static.h"

void large_static::event_process() {
    static_list_event.notify();
}

void large_static::another_porcess() {
    sc_time timeout(2, SC_MS);

    while (true) {
        wait(); // 等待在spi_clk或者usb_rdy上出现事件
        cout << "Found event on spi_clk or usb_rdy " << endl;

        wait(timeout); // 等待超过2ms时间
        cout << "Waited for 2ms" << endl;

        wait(timeout, static_list_event); //等待
        // 超过规定时间或者是 stat, bus1, ucint 或 adr_match 上出现事件
        cout << "Either time out or event occurred on stat," << "bus1, ucint or addr_match" << endl;
    }
}
